//
//  non-typeParam.hpp
//  learnC++
//
//  Created by liuzhibing on 2018/6/20.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#ifndef non_typeParam_hpp
#define non_typeParam_hpp

#include <stdio.h>
#include <iostream>

template <class T,int size>
class StaticArray {
private:
    T m_array[size];
    
public:
    
    T *getArray();
    
    T &operator[](int index){
        return m_array[index];
    }
};

template <class T,int size>
T *StaticArray<T,size>::getArray(){
    return m_array;
}

/*
 StaticArray<int, 12> iArr;
 */

#endif /* non_typeParam_hpp */
